home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / MDP-80 Folder / Programs / Hello.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-11-30  |  1.1 KB  |  28 lines  |  [TEXT/ALFA]

  1. ;  Hello.world  -  Displays "Hello, world!"
  2.  
  3. #include std.equ    ; Standard monitor equates
  4.  
  5. #org  1000          ; Program begins at address 1000 (hexadecimal)
  6.  
  7. ; Begin program
  8.  
  9.          lda #0c                   ; 0C=12, clears the screen
  10.          jsr _cout                 ; monitor routine
  11.          ldy #0a                   ; load 10 into Y
  12.          jsr down                  ; and call our routine
  13.          ldx #23                   ; X holds count
  14.          jsr _blanks               ; print the blanks
  15.          lda >message              ; put high byte of MESSAGE in A
  16.          ldx <message              ; put low byte of MESSAGE in X
  17.          jsr _print                ; monitor routine to print string
  18.          rts                       ; pointed to by A and X
  19. .message asc 'Hello, world!'       ; here is the string
  20.          hex 0d00                  ; 0d is return, 00 ends the string
  21. .down    lda #0d                   ; the return character
  22. .again   jsr _cout                 ; monitor print character routine
  23.          dey                       ; decrease count
  24.          bne again                 ; if not zero print again
  25.          rts
  26.  
  27. ; end
  28.